package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.R;
import com.zzyl.nursing.dto.UserLoginRequestDto;
import com.zzyl.nursing.vo.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import com.zzyl.common.core.controller.BaseController;
import com.zzyl.nursing.service.IFamilyMemberService;

/**
 * 老人家属Controller
 *
 * @author Zhy
 * @date 2025-03-03
 */
@Api(tags = "老人家属管理")
@RestController
@RequestMapping("/member/user")
@RequiredArgsConstructor
public class FamilyMemberController extends BaseController {

	private final IFamilyMemberService familyMemberService;

	/**
	 * 小程序登录
	 *
	 * @return:
	 * @param: userLoginRequestDto 用户登录请求参数
	 */
	@PostMapping("/login")
	@ApiOperation("小程序登录")
	public R<LoginVo> login(@RequestBody UserLoginRequestDto userLoginRequestDto) {
		LoginVo loginVo = familyMemberService.login(userLoginRequestDto);
		return R.ok(loginVo);
	}

}
